<%@ page contentType="text/html; charset=utf-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script>
                        function login_confirm() {
                if (document.getElementById("uidtxt").value.replace(/^\s*/, "") == "") {
                    document.getElementById("tsmsg").innerHTML = "用户名不能为空！";
                    document.getElementById("uidtxt").focus();
                    return false;
                }
                if (document.getElementById("pwdtxt").value.replace(/^\s*/, "") == "") {
                    document.getElementById("tsmsg").innerHTML = "密码不能为空！";
                    document.getElementById("pwdtxt").focus();
                    return false;
                }
                document.getElementById("tsmsg").innerHTML = "";
                document.login_.submit();

            }
        </script>
    </head>
    <body>
        <s:form action="login" namespace="/" method="post" theme="simple" id="login_" name="login_">
                                    <table width="100%" border="0" cellspacing="10" cellpadding="0" style="margin-top:10px;">
                                        <tr>
                                            <td width="31%" align="right">帐&nbsp; 号：</td>
                                            <td width="69%"><input  onkeypress="passwordPress(event)" name="username" id="uidtxt"/></td>
                                        </tr>
                                        <tr>
                                            <td align="right">密&nbsp; 码：</td>
                                            <td height="40"><input name="password" type="password"
                                                                   id="pwdtxt" onKeyPress="passwordPress(event)"/></td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td height="40" valign="bottom"><input type="button" onClick="login_confirm()" style="background:url(images/index_login.jpg);width:78px;height:28px; border:0"/>
                                                <DIV style="COLOR: red;" id="tsmsg"><s:property value="msg"/></DIV></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2"><table width="100%%" border="0" cellspacing="0" cellpadding="0" style="margin-top:15px">
                                                    <tr>
                                                        <td width="25%" align="right"><input type="radio" style="width:15px;height:15px; border:0;float:right"/></td>
                                                        <td width="39%">记住用户名</td>
                                                        <td width="36%">忘记密码？</td>
                                                    </tr>
                                                </table></td>
                                        </tr>
                                    </table>
                                </s:form>
    </body>
</html>
